package com.itheima.web.job;

import com.itheima.service.db.AnalysisByDayService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author Guanxing
 * @date 2021/10/7
 */
@Component
public class LogTask {

    @Reference
    private AnalysisByDayService analysisByDayService;

    //@Scheduled(cron = "0/5 * * * * *")
    @Scheduled(cron = "* * 0/1 * * *")
    public void run(){
        analysisByDayService.saveOrUpdate();
    }
}
